<?php /*a:3:{s:60:"/www/wwwroot/ams/app/index/view/achievement_audit/audit.html";i:1588827673;s:50:"/www/wwwroot/ams/app/index/view/public/header.html";i:1588821168;s:50:"/www/wwwroot/ams/app/index/view/public/footer.html";i:1588833951;}*/ ?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8" />
    <link rel="apple-touch-icon" sizes="76x76" href="/static/index/moban/assets/img/apple-icon.png">
    <link rel="icon" type="image/png" href="/static/index/moban/assets/img/favicon.png">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <title>成果审核 | <?php echo htmlentities($system_name); ?></title>
    <meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no'
        name='viewport' />
    <link href="/static/index/moban/assets/css/bootstrap.min.css" rel="stylesheet" />
    <link href="/static/index/moban/assets/css/now-ui-kit.css?v=1.1.0" rel="stylesheet" />
    <link href="/static/index/moban/assets/css/font-awesome.min.css" rel="stylesheet" />
</head>

<body class="index-page sidebar-collapse">

    <!-- 引入导航栏 -->
    <nav class="navbar navbar-expand-lg bg-info fixed-top">
    <div class="container">
        <div class="navbar-translate">
            <div class="navbar-brand text-white" style="font-size: 22px;"><?php echo htmlentities($system_name); ?></div>
            <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse"
                data-target="#example-navbar-info" aria-controls="navbarSupportedContent" aria-expanded="false"
                aria-label="Toggle navigation">
                <span class="navbar-toggler-bar bar1"></span>
                <span class="navbar-toggler-bar bar2"></span>
                <span class="navbar-toggler-bar bar3"></span>
            </button>
        </div>

        <div class="collapse navbar-collapse justify-content-end has-image" id="example-navbar-info">
            <ul class="navbar-nav">
                <li class="nav-item" style="float: right;">
                    <a class="nav-link" href="<?php echo url('index/index'); ?>">
                        <p style="font-size: 16px;">首页</p>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="<?php echo url('index/notice_list'); ?>">
                        <p style="font-size: 16px;">更多资讯</p>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="<?php echo url('index/link'); ?>">
                        <p style="font-size: 16px;">友情链接</p>
                    </a>
                </li>
                <?php if($user_info): ?>
                <li class="nav-item active">
                    <a class="nav-link" href="<?php echo url('User/index'); ?>">
                        <p><?php echo htmlentities($user_info->name); ?></p>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="<?php echo url('Login/logout'); ?>">
                        <p>退出</p>
                    </a>
                </li>
                <?php else: if($registered): ?>
                <li class="nav-item">
                    <a class="nav-link" href="<?php echo url('Login/index'); ?>">
                        <p>登录</p>
                    </a>
                </li>
                <li class="nav-item">
                    <a class="nav-link" href="<?php echo url('Login/register'); ?>">
                        <p>注册</p>
                    </a>
                </li>
                <?php else: ?>
                <li class="nav-item">
                    <a class="nav-link" href="<?php echo url('Login/index'); ?>">
                        <p>登录</p>
                    </a>
                </li>
                <?php endif; ?>
                <?php endif; ?>
            </ul>
        </div>
    </div>
</nav>
<!-- 向下推65像素 -->
<div style="height: 65px;"></div>

<!-- 防止闪屏 -->
<script src="/static/index/moban/assets/js/plugins/jquery.sharrre.js" type="text/javascript"></script>
<!-- Code JS File -->
<script src="/static/index/moban/assets/js/core/jquery.3.2.1.min.js" type="text/javascript"></script>
<script src="/static/index/moban/assets/js/core/popper.min.js" type="text/javascript"></script>
<script src="/static/index/moban/assets/js/core/bootstrap.min.js" type="text/javascript"></script>

<!-- 弹出层 -->
<script src="/static/admin/lib/layer/layer.js"></script>

<!-- 模板动作 -->
<script src="/static/index/moban/assets/js/now-ui-kit.js?v=1.1.0" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        // the body of this function is in assets/js/now-ui-kit.js
        nowuiKit.initSliders();
    });

    function scrollToDownload() {

        if ($('.section-download').length != 0) {
            $("html, body").animate({
                scrollTop: $('.section-download').offset().top
            }, 1000);
        }
    }
</script>

    <div class="container" style="min-height: 490px;">
        <!-- 个人信息 -->
        <div class="row">
            <div class="col-md-12">
                <h3>成果审核</h3>
            </div>

            <!-- <button class="btn btn-info">全部通过</button> -->
            <button class="btn btn-danger" onclick="back()">返回上一页</button>
        </div>

        <?php if(is_array($classify_table_other_data) || $classify_table_other_data instanceof \think\Collection || $classify_table_other_data instanceof \think\Paginator): $i = 0; $__LIST__ = $classify_table_other_data;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$ctod_row): $mod = ($i % 2 );++$i;?>
        <div class="row">
            <?php if(is_array($classify_table_info['table_content']['names']) || $classify_table_info['table_content']['names'] instanceof \think\Collection || $classify_table_info['table_content']['names'] instanceof \think\Paginator): $j = 0; $__LIST__ = $classify_table_info['table_content']['names'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$row): $mod = ($j % 2 );++$j;?>
            <div class="col-md-6">
                <div class="input-group">
                    <span class="input-group-addon">
                        &nbsp;<?php echo htmlentities($row); ?>
                    </span>
                    <?php if($classify_type_list[$classify_table_info['table_content']['selects'][$j-1]-1]['name'] ==
                    '时间'): ?>
                    <div class="form-control">
                        <?php echo htmlentities(date('Y-m-d',!is_numeric($classify_table_other_data[$i-1][$classify_table_info['table_content']['cols'][$j-1]])? strtotime($classify_table_other_data[$i-1][$classify_table_info['table_content']['cols'][$j-1]]) : $classify_table_other_data[$i-1][$classify_table_info['table_content']['cols'][$j-1]])); ?>
                    </div>
                    <?php else: if($classify_type_list[$classify_table_info['table_content']['selects'][$j-1]-1]['name'] ==
                    '数值'): ?>
                    <div class="form-control">
                        <?php echo htmlentities(floatval($classify_table_other_data[$i-1][$classify_table_info['table_content']['cols'][$j-1]] / 100)); ?>
                    </div>
                    <?php else: ?>
                    <div class="form-control">
                        <?php echo htmlentities($classify_table_other_data[$i-1][$classify_table_info['table_content']['cols'][$j-1]]); ?>
                    </div>
                    <?php endif; ?>
                    <?php endif; ?>
                </div>
            </div>
            <?php endforeach; endif; else: echo "" ;endif; ?>
            <div class="col-md-12">
                <div class="input-group">
                    <span class="input-group-addon">
                        &nbsp;上传驳回的信息 :
                    </span>
                    <div class="form-control">
                        <?php echo htmlentities($classify_table_other_data[$i-1]['note']); ?>
                    </div>
                </div>
            </div>

            <div class="col-md-12" style="text-align: center;margin-bottom: 20px;">
                <button class="btn btn-success"
                    onclick="through('<?php echo htmlentities($classify_table_other_data[$i-1]['id']); ?>')">通过</button>
                <button class="btn btn-danger"
                    onclick="rejected('<?php echo htmlentities($classify_table_other_data[$i-1]['id']); ?>')">驳回</button>
            </div>
        </div>
        <?php endforeach; endif; else: echo "" ;endif; ?>
    </div>

    <!-- 引入页脚 -->
    <footer class="footer " style="background-color: #ddd;">
    <div style="text-align: center;">
        Copyright © 2020 夏立军 山东建筑大学-<?php echo htmlentities($system_name); ?> 201611106025
    </div>
</footer>
    <script>

        // 通过
        function through(id) {

            layer.confirm('是否确认通过？', {
                btn: ['是', '否'] //按钮
            }, function () {
                $.ajax({
                    url: "<?php echo url('achievement_audit/through'); ?>",
                    data: {
                        'id': id,
                        'cid': "<?php echo htmlentities($cid); ?>",
                        'uid': "<?php echo htmlentities($uid); ?>",
                    },
                    type: "POST",
                    dataType: "JSON",
                    async: true,
                    success: function (res) {
                        // 返回结果处理
                        if (res.code == 0) {
                            return layer.msg(res.msg, { icon: 1, time: 900 }, function () {
                                location.reload()
                            });
                        } else {
                            return layer.msg(res.msg, { icon: 2, time: 900 });
                        }
                    }
                });
            }, function () { });

        }

        // 驳回
        function rejected(id) {
            layer.prompt({ title: '请填写要驳回的理由', formType: 2 }, function (note, index) {
                layer.close(index);
                $.ajax({
                    url: "<?php echo url('achievement_audit/rejected'); ?>",
                    data: {
                        'id': id,
                        'cid': "<?php echo htmlentities($cid); ?>",
                        'uid': "<?php echo htmlentities($uid); ?>",
                        'note': note
                    },
                    type: "POST",
                    dataType: "JSON",
                    async: true,
                    success: function (res) {
                        // 返回结果处理
                        if (res.code == 0) {
                            return layer.msg(res.msg, { icon: 1, time: 900 }, function () {
                                location.reload()
                            });
                        } else {
                            return layer.msg(res.msg, { icon: 2, time: 900 });
                        }
                    }
                });
            });
        }

        // 返回 
        function back() {
            redirect_url("<?php echo url('achievement_audit/details'); ?>?cid=<?php echo htmlentities($cid); ?>")
        }

        // 重定向
        function redirect_url(url) {
            window.location.href = url;
        }
    </script>

</body>

</html>